import { PartialType } from '@nestjs/mapped-types';
import { IsDate, IsInt, IsNotEmpty, isNotEmpty, IsOptional } from "class-validator";
import { Type } from "class-transformer";

export class UpdateUserDto {

  @IsNotEmpty()
  username: string;

  @IsOptional()
  realName?: string;

  @IsOptional()
  phone?: string;

  @IsOptional()
  @Type(()=>Number)
  status?: number;

  @IsOptional()
  @Type(()=>Number)
  @IsInt()
  level?:number

  @IsOptional()
  @Type(() => Date)
  @IsDate()
  birthday: Date
}